package fr.aracore.domotique.zapi.core;

public class ZbRequest extends ZbHeader {
	private String script;
	
	public ZbRequest(){
		super();
	}
	public ZbRequest(String script){
		this();
		this.script=script+0x0;
//		if (this.script!=null && this.script.length()>96)
//			this.script=this.script.substring(0,96);
		
	}
	
	public byte[] getBytes() {
		if (script==null)
			return super.getBytes();
		else{
			byte[]array1=super.getBytes();
			byte[]array2=script.getBytes();
			byte[]lcResult=new byte[array1.length + 96];
			System.arraycopy(array1, 0, lcResult, 0, array1.length);
			System.arraycopy(array2, 0, lcResult, array1.length, 96);
			return lcResult;
		}
	}
	
}
